Update dependency floki to v0.38.0 #52
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
0.34.3->0.38.0Release Notes
philss/floki (floki)
v0.38.0Compare Source
Added
This version adds initial support for the
:haspseudo-selector.It is a great addition that enables finding elements containing
matching children.
Examples for selectors:
"div:has(h1)""div:has(h1, p, span)""div:has(p.foo)""div:has(img[src='https://example.com'])""tr:has(*:fl-contains('TEST'))"Note that combinators like
">"are not allowed yet.Thank you @bvobart for this feature!
Fixed
Add
:styleoption documentation toFloki.text/2.Thanks @s3cur3 for the fix.
Fix deprecation warnings for upcoming Elixir 1.19.
Prevent from crashing when selector is an empty string.
Removed
Remove support for Elixir 1.14 and OTP 23.
Remove deprecated functions and function clauses
that were accepting strings (binaries).
Affected functions:
parse/1- removed functionmap/2- removed functionattr/4- removed clausefind/2- removed clausetext/3- removed clausetext/3- removed clauseattribute/2- removed clausefilter_out/2- removed clauseHTML must be parsed before searching. Functions like
Floki.find/2,Floki.attribute/2, and other HTML manipulation functions no longer workdirectly with HTML strings. The HTML must be parsed first using
Floki.parse_fragment/2orFloki.parse_document/2.Before:
After:
v0.37.1Compare Source
Fixed
This is a fix to be compatible with the upcoming OTP 28.
v0.37.0Compare Source
Added
Floki.css_escape/1- thanks @SteffenDE.Fixed
raw_html/2- thanks @andyleclair.Removed
v0.36.3Compare Source
This release contains some performance improvements, thanks to @ypconstante.
Fixed
Stop
Floki.get_by_id/2traversal on first match. Thanks @ypconstante.Remove extra whitespaces from nodes without attributes on
Floki.raw_html/1.Thank you @ypconstante.
Fix
Floki.raw_html/1typespecs. Thanks @davydog187.v0.36.2Compare Source
Added
Inspectprotocol for theFloki.HTMLTreestruct.This struct is currently private. Thank you @vittoriabitton.
Fixed
Fix regression to respect config option
:encodeinFloki.raw_html/2.Thanks @Sgoettschkes.
Make the
Floki.raw_html/2treat the contents of the<title>tag as plain text.The idea is to align with
parse_document/2.Thank you @aymanosman.
v0.36.1Compare Source
Fixed
get_by_id/2.v0.36.0Compare Source
Added
Floki.get_by_id/1that returns one element by ID ornil.Thanks @SteffenDE.
Changed
Keyword.validate!/2.This is not a change in APIs, but the error messages and opts validation
should be standardized now.
Thanks @vittoriabitton.
Removed
v0.35.4Compare Source
Besides the fix described below, this release also contains more performance
improvements, thanks to @ypconstante.
Fixed
Floki.find/2. This was a regression from theprevious version - thanks @ypconstante.
v0.35.3Compare Source
This release has great performance improvements, thanks to the PRs
from @ypconstante!
Most of the main functions, such as
Floki.raw_html/2andFloki.find/2arefaster and are using less memory. It's something like twice as fast, and half
usage of memory for
find/2, for example.Fixed
Add
:leexto Mix compilers. Fixes the build when running with dev version of Elixir.Thanks @wojtekmach.
Fix
Floki.raw_html/2when a tree using attributes as maps is given.Thanks @SupaMic.
Add a guard to
Floki.find/2so people can have a better error message when aninvalid input is given. Thanks @Hajto.
Fix parsers to consider IO data as inputs. This may change in the next version
of Floki, as I plan to drop support for IO data.
Thanks @ypconstante.
Removed
has changed. So now
the wrapper is not needed anymore.
Thanks @michallepicki.
v0.35.2Compare Source
Fixed
parser module.
v0.35.1Compare Source
Fixed
malformed HTML was used. For more details, see the original issuehttps://github.com/philss/floki/issues/492/492
v0.35.0Compare Source
Added
Add support for parsing attributes as maps.
This makes
parse_document/2andparse_fragment/2accept the option:attributes_as_mapsto change the behaviour and return attributes asmaps instead of lists of tuples.
The only parser that does not support it yet is the
fast_html.Changed
Drop support for Elixir v1.11.
Change the log level of parsing logger calls from "info" to "debug".
This will help to reduce the amount of noise in production apps.
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.